inherited frmCadLanctoNotasPEC: TfrmCadLanctoNotasPEC
  Left = 216
  Top = 65
  Width = 883
  Height = 641
  Caption = 'Lan'#231'amento de NFP - Pecu'#225'ria'
  OldCreateOrder = True
  PixelsPerInch = 96
  TextHeight = 13
  inherited pgcCadastro: TcxPageControl
    Width = 867
    Height = 577
    ActivePage = tbsEdita
    ClientRectBottom = 572
    ClientRectRight = 862
    inherited tbsLista: TcxTabSheet
      inherited Grid: TcxGrid
        Width = 857
        Height = 527
        inherited GridDBBandedTableView2: TcxGridDBBandedTableView
          object GridDBBandedTableView2CODIGO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'CODIGO'
            Position.BandIndex = 0
            Position.ColIndex = 0
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2CONTA: TcxGridDBBandedColumn
            DataBinding.FieldName = 'CONTA'
            Position.BandIndex = 0
            Position.ColIndex = 1
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2VALOR: TcxGridDBBandedColumn
            DataBinding.FieldName = 'VALOR'
            Position.BandIndex = 0
            Position.ColIndex = 2
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2HISTORICO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'HISTORICO'
            Position.BandIndex = 0
            Position.ColIndex = 3
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2NUMERO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'NUMERO'
            Position.BandIndex = 0
            Position.ColIndex = 4
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2SERIE: TcxGridDBBandedColumn
            DataBinding.FieldName = 'SERIE'
            Position.BandIndex = 0
            Position.ColIndex = 5
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2DT_EMISSAO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'DT_EMISSAO'
            Position.BandIndex = 0
            Position.ColIndex = 6
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2DT_DOCTO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'DT_DOCTO'
            Position.BandIndex = 0
            Position.ColIndex = 7
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2OPERACAO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'OPERACAO'
            Position.BandIndex = 0
            Position.ColIndex = 8
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2PRODUTOR: TcxGridDBBandedColumn
            DataBinding.FieldName = 'PRODUTOR'
            Position.BandIndex = 0
            Position.ColIndex = 9
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2NOME_PRODUTOR: TcxGridDBBandedColumn
            DataBinding.FieldName = 'NOME_PRODUTOR'
            Position.BandIndex = 0
            Position.ColIndex = 10
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2NOME_OPERACAO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'NOME_OPERACAO'
            Position.BandIndex = 0
            Position.ColIndex = 11
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2NOME_PLANO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'NOME_PLANO'
            Position.BandIndex = 0
            Position.ColIndex = 12
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2NOME_TERCEIRO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'NOME_TERCEIRO'
            Position.BandIndex = 0
            Position.ColIndex = 13
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2TERCEIRO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'TERCEIRO'
            Position.BandIndex = 0
            Position.ColIndex = 14
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2COD_HISTORICO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'COD_HISTORICO'
            Position.BandIndex = 0
            Position.ColIndex = 15
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2HISTORICO_PADRAO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'HISTORICO_PADRAO'
            Position.BandIndex = 0
            Position.ColIndex = 16
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2PROPRIEDADE_1: TcxGridDBBandedColumn
            DataBinding.FieldName = 'PROPRIEDADE_1'
            Position.BandIndex = 0
            Position.ColIndex = 17
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2PROPRIEDADE_2: TcxGridDBBandedColumn
            DataBinding.FieldName = 'PROPRIEDADE_2'
            Position.BandIndex = 0
            Position.ColIndex = 18
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2PROPRIEDADE_PRODUTOR: TcxGridDBBandedColumn
            DataBinding.FieldName = 'PROPRIEDADE_PRODUTOR'
            Position.BandIndex = 0
            Position.ColIndex = 19
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2PROPRIEDADE_TERCEIRO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'PROPRIEDADE_TERCEIRO'
            Position.BandIndex = 0
            Position.ColIndex = 20
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2MES: TcxGridDBBandedColumn
            DataBinding.FieldName = 'MES'
            Position.BandIndex = 0
            Position.ColIndex = 21
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2FECHADA: TcxGridDBBandedColumn
            DataBinding.FieldName = 'FECHADA'
            PropertiesClassName = 'TcxCheckBoxProperties'
            Properties.ValueChecked = 'S'
            Properties.ValueUnchecked = 'N'
            Position.BandIndex = 0
            Position.ColIndex = 22
            Position.RowIndex = 0
          end
          object GridDBBandedTableView2UF_EMISSAO: TcxGridDBBandedColumn
            DataBinding.FieldName = 'UF_EMISSAO'
            Position.BandIndex = 0
            Position.ColIndex = 23
            Position.RowIndex = 0
          end
        end
      end
      inherited Panel1: TPanel
        Width = 857
      end
    end
    inherited tbsEdita: TcxTabSheet
      OnShow = tbsEditaShow
      inherited Panel2: TPanel
        Width = 857
        Height = 544
        object pnlSubCad: TPanel
          Left = 1
          Top = 272
          Width = 855
          Height = 271
          Align = alClient
          BevelOuter = bvNone
          TabOrder = 1
          object PgcComplementar: TcxPageControl
            Left = 0
            Top = 0
            Width = 855
            Height = 271
            ActivePage = cxTabSheet1
            Align = alClient
            ShowFrame = True
            TabOrder = 0
            ClientRectBottom = 266
            ClientRectLeft = 5
            ClientRectRight = 850
            ClientRectTop = 28
            object cxTabSheet1: TcxTabSheet
              Caption = '  Nota Fiscal - Itens     '
              ImageIndex = 0
              object PGCSub1: TcxPageControl
                Left = 0
                Top = 0
                Width = 845
                Height = 238
                ActivePage = tbsListaComp1
                Align = alClient
                HideTabs = True
                TabOrder = 0
                ClientRectBottom = 237
                ClientRectLeft = 1
                ClientRectRight = 844
                ClientRectTop = 1
                object tbsListaComp1: TcxTabSheet
                  Caption = 'Pesquisa'
                  ImageIndex = 0
                  OnEnter = tbsListaComp1Enter
                  object cxGrid1: TcxGrid
                    Left = 0
                    Top = 0
                    Width = 843
                    Height = 236
                    Align = alClient
                    TabOrder = 0
                    object cxGridDBTableView1: TcxGridDBTableView
                      NavigatorButtons.ConfirmDelete = False
                      NavigatorButtons.Insert.Visible = False
                      NavigatorButtons.Append.Enabled = False
                      NavigatorButtons.Delete.Visible = False
                      NavigatorButtons.Edit.Visible = False
                      NavigatorButtons.Post.Visible = False
                      NavigatorButtons.Cancel.Visible = False
                      NavigatorButtons.Refresh.Enabled = False
                      NavigatorButtons.Refresh.Visible = False
                      NavigatorButtons.SaveBookmark.Enabled = False
                      NavigatorButtons.SaveBookmark.Visible = False
                      NavigatorButtons.GotoBookmark.Visible = False
                      DataController.DataSource = dsPesquisaComp1
                      DataController.Summary.DefaultGroupSummaryItems = <>
                      DataController.Summary.FooterSummaryItems = <>
                      DataController.Summary.SummaryGroups = <>
                      OptionsBehavior.IncSearch = True
                      OptionsBehavior.NavigatorHints = True
                      OptionsCustomize.ColumnHiding = True
                      OptionsData.CancelOnExit = False
                      OptionsData.Deleting = False
                      OptionsData.DeletingConfirmation = False
                      OptionsData.Editing = False
                      OptionsData.Inserting = False
                      OptionsSelection.CellSelect = False
                      OptionsSelection.InvertSelect = False
                      OptionsSelection.UnselectFocusedRecordOnExit = False
                      OptionsView.Footer = True
                      OptionsView.FooterAutoHeight = True
                      OptionsView.GroupByBox = False
                      OptionsView.GroupFooters = gfAlwaysVisible
                      OptionsView.Indicator = True
                      Preview.Visible = True
                    end
                    object cxGrid1DBBandedTableView1: TcxGridDBBandedTableView
                      OnKeyDown = GridDBBandedTableView2KeyDown
                      NavigatorButtons.ConfirmDelete = False
                      DataController.DataSource = dsPesquisaComp1
                      DataController.Summary.DefaultGroupSummaryItems = <>
                      DataController.Summary.FooterSummaryItems = <>
                      DataController.Summary.SummaryGroups = <>
                      FilterRow.InfoText = 'Click here to define a filter'
                      NewItemRow.InfoText = 'Click here to add a new row'
                      OptionsData.CancelOnExit = False
                      OptionsData.Deleting = False
                      OptionsData.DeletingConfirmation = False
                      OptionsData.Editing = False
                      OptionsData.Inserting = False
                      OptionsView.Footer = True
                      OptionsView.GroupByBox = False
                      OptionsView.GroupFooters = gfAlwaysVisible
                      OptionsView.BandHeaders = False
                      Bands = <
                        item
                        end>
                      object cxGrid1DBBandedTableView1CODIGO: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'CODIGO'
                        Position.BandIndex = 0
                        Position.ColIndex = 0
                        Position.RowIndex = 0
                      end
                      object cxGrid1DBBandedTableView1PRODUTO: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'PRODUTO'
                        Position.BandIndex = 0
                        Position.ColIndex = 1
                        Position.RowIndex = 0
                      end
                      object cxGrid1DBBandedTableView1QTDE: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'QTDE'
                        Position.BandIndex = 0
                        Position.ColIndex = 2
                        Position.RowIndex = 0
                      end
                      object cxGrid1DBBandedTableView1VALOR: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'VALOR'
                        Position.BandIndex = 0
                        Position.ColIndex = 3
                        Position.RowIndex = 0
                      end
                      object cxGrid1DBBandedTableView1TOTAL: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'TOTAL'
                        Position.BandIndex = 0
                        Position.ColIndex = 4
                        Position.RowIndex = 0
                      end
                      object cxGrid1DBBandedTableView1NOTA_FISCAL: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'NOTA_FISCAL'
                        Position.BandIndex = 0
                        Position.ColIndex = 5
                        Position.RowIndex = 0
                      end
                      object cxGrid1DBBandedTableView1NOME_PRODUTO: TcxGridDBBandedColumn
                        DataBinding.FieldName = 'NOME_PRODUTO'
                        Position.BandIndex = 0
                        Position.ColIndex = 6
                        Position.RowIndex = 0
                      end
                    end
                    object cxGridLevel1: TcxGridLevel
                      GridView = cxGrid1DBBandedTableView1
                    end
                  end
                end
                object tbsEditaComp1: TcxTabSheet
                  Caption = 'Registro'
                  ImageIndex = 1
                  OnEnter = tbsEditaComp1Enter
                  object edtCodigoEnd: TcxDBTextEdit
                    Left = 9
                    Top = 24
                    TabStop = False
                    DataBinding.DataField = 'CODIGO'
                    DataBinding.DataSource = dsRegistroComp1
                    Properties.CharCase = ecUpperCase
                    Properties.ReadOnly = True
                    Style.Color = clInactiveBorder
                    TabOrder = 0
                    Width = 65
                  end
                  object cxLabel8: TcxLabel
                    Left = 8
                    Top = 8
                    Caption = 'C'#243'digo'
                    Transparent = True
                  end
                  object cbProduto: TcxDBLookupComboBox
                    Left = 74
                    Top = 24
                    DataBinding.DataField = 'PRODUTO'
                    DataBinding.DataSource = dsRegistroComp1
                    Properties.CharCase = ecUpperCase
                    Properties.DropDownAutoSize = True
                    Properties.KeyFieldNames = 'CODIGO'
                    Properties.ListColumns = <
                      item
                        FieldName = 'NOME'
                      end
                      item
                        FieldName = 'CODIGO'
                      end>
                    Properties.ListSource = dsProdutos
                    TabOrder = 1
                    Width = 375
                  end
                  object cxLabel9: TcxLabel
                    Left = 72
                    Top = 8
                    Caption = 'Produto'
                    Transparent = True
                  end
                  object btnProduto: TcxButtonEdit
                    Left = 448
                    Top = 24
                    TabStop = False
                    Properties.Buttons = <
                      item
                        Caption = 'F9'
                        Default = True
                        Kind = bkText
                      end>
                    Properties.ViewStyle = vsButtonsOnly
                    TabOrder = 7
                    Text = 'btnProduto'
                    OnClick = btnProdutoClick
                    Width = 25
                  end
                  object cxDBCalcEdit6: TcxDBCalcEdit
                    Left = 578
                    Top = 24
                    DataBinding.DataField = 'VALOR'
                    DataBinding.DataSource = dsRegistroComp1
                    Style.LookAndFeel.Kind = lfOffice11
                    Style.ButtonStyle = btsFlat
                    StyleDisabled.LookAndFeel.Kind = lfOffice11
                    StyleFocused.LookAndFeel.Kind = lfOffice11
                    StyleHot.LookAndFeel.Kind = lfOffice11
                    TabOrder = 3
                    Width = 103
                  end
                  object cxLabel10: TcxLabel
                    Left = 578
                    Top = 8
                    Caption = 'Valor Unit'#225'rio'
                    Transparent = True
                  end
                  object cxDBCalcEdit7: TcxDBCalcEdit
                    Left = 474
                    Top = 24
                    DataBinding.DataField = 'QTDE'
                    DataBinding.DataSource = dsRegistroComp1
                    Style.LookAndFeel.Kind = lfOffice11
                    Style.ButtonStyle = btsFlat
                    StyleDisabled.LookAndFeel.Kind = lfOffice11
                    StyleFocused.LookAndFeel.Kind = lfOffice11
                    StyleHot.LookAndFeel.Kind = lfOffice11
                    TabOrder = 2
                    Width = 103
                  end
                  object cxLabel11: TcxLabel
                    Left = 472
                    Top = 8
                    Caption = 'Quantidade'
                    Transparent = True
                  end
                  object cxDBCalcEdit8: TcxDBCalcEdit
                    Left = 682
                    Top = 24
                    DataBinding.DataField = 'TOTAL'
                    DataBinding.DataSource = dsRegistroComp1
                    Properties.ReadOnly = True
                    Style.Color = clInactiveBorder
                    Style.LookAndFeel.Kind = lfOffice11
                    Style.ButtonStyle = btsFlat
                    StyleDisabled.LookAndFeel.Kind = lfOffice11
                    StyleFocused.LookAndFeel.Kind = lfOffice11
                    StyleHot.LookAndFeel.Kind = lfOffice11
                    TabOrder = 4
                    Width = 103
                  end
                  object cxLabel12: TcxLabel
                    Left = 682
                    Top = 8
                    Caption = 'Total'
                    Transparent = True
                  end
                end
              end
            end
          end
        end
        object pnlLancto: TPanel
          Left = 1
          Top = 1
          Width = 855
          Height = 271
          Align = alTop
          BevelOuter = bvNone
          PopupMenu = PopupMenu1
          TabOrder = 0
          OnEnter = pnlLanctoEnter
          object cxDBMemo1: TcxDBMemo
            Left = 10
            Top = 216
            DataBinding.DataField = 'HISTORICO'
            DataBinding.DataSource = dsRegistro
            TabOrder = 13
            OnExit = cxDBMemo1Exit
            Height = 53
            Width = 689
          end
          object cxDBCalcEdit1: TcxDBCalcEdit
            Left = 446
            Top = 153
            DataBinding.DataField = 'VALOR'
            DataBinding.DataSource = dsRegistro
            Style.LookAndFeel.Kind = lfOffice11
            Style.ButtonStyle = btsFlat
            StyleDisabled.LookAndFeel.Kind = lfOffice11
            StyleFocused.LookAndFeel.Kind = lfOffice11
            StyleHot.LookAndFeel.Kind = lfOffice11
            TabOrder = 11
            Width = 121
          end
          object cxLabel3: TcxLabel
            Left = 446
            Top = 135
            Caption = 'Valor'
            Transparent = True
          end
          object cxLabel6: TcxLabel
            Left = 353
            Top = 58
            Caption = 'Propriedade - Produtor'
            Transparent = True
          end
          object cbProdutor: TcxDBLookupComboBox
            Left = 10
            Top = 74
            DataBinding.DataField = 'PRODUTOR'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'NOME'
              end>
            Properties.ListSource = dsProdutor
            TabOrder = 5
            OnExit = cbProdutorExit
            Width = 320
          end
          object cxLabel2: TcxLabel
            Left = 10
            Top = 58
            Caption = 'Produtor'
            Transparent = True
          end
          object edtCodigo: TcxDBTextEdit
            Left = 10
            Top = 31
            TabStop = False
            DataBinding.DataField = 'CODIGO'
            DataBinding.DataSource = dsRegistro
            Properties.ReadOnly = True
            Style.Color = clInactiveBorder
            TabOrder = 0
            Width = 65
          end
          object cxLabel1: TcxLabel
            Left = 10
            Top = 14
            Caption = 'C'#243'digo'
            Transparent = True
          end
          object cxLabel16: TcxLabel
            Left = 72
            Top = 14
            Caption = 'Dt. Movimento'
            Transparent = True
          end
          object cxDBDateEdit2: TcxDBDateEdit
            Left = 74
            Top = 31
            DataBinding.DataField = 'DT_DOCTO'
            DataBinding.DataSource = dsRegistro
            TabOrder = 1
            Width = 88
          end
          object cxLabel17: TcxLabel
            Left = 162
            Top = 14
            Caption = 'Dt. Emiss'#227'o'
            Transparent = True
          end
          object cxLabel19: TcxLabel
            Left = 253
            Top = 14
            Caption = 'Opera'#231#227'o'
            Transparent = True
          end
          object cbConta: TcxDBLookupComboBox
            Left = 99
            Top = 153
            DataBinding.DataField = 'CONTA'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'NOME'
              end
              item
                FieldName = 'CODIGO_STR'
              end>
            Properties.ListSource = dsConta
            TabOrder = 10
            Width = 320
          end
          object cbTerceiro: TcxDBLookupComboBox
            Left = 10
            Top = 114
            DataBinding.DataField = 'TERCEIRO'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'NOME'
              end>
            Properties.ListSource = dsTerceiro
            TabOrder = 7
            Width = 320
          end
          object cxLabel5: TcxLabel
            Left = 10
            Top = 98
            Caption = 'Terceiro'
            Transparent = True
          end
          object cxLabel7: TcxLabel
            Left = 99
            Top = 135
            Caption = 'Conta'
            Transparent = True
          end
          object cxDBTextEdit3: TcxDBTextEdit
            Left = 565
            Top = 31
            DataBinding.DataField = 'NUMERO'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            TabOrder = 4
            Width = 68
          end
          object cxDBDateEdit1: TcxDBDateEdit
            Left = 164
            Top = 31
            DataBinding.DataField = 'DT_EMISSAO'
            DataBinding.DataSource = dsRegistro
            TabOrder = 2
            Width = 88
          end
          object cxLabel4: TcxLabel
            Left = 563
            Top = 14
            Caption = 'NF'
            Transparent = True
          end
          object cbOperacao: TcxDBLookupComboBox
            Left = 253
            Top = 31
            DataBinding.DataField = 'OPERACAO'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'NOME'
              end>
            Properties.ListSource = dsOperacoes
            TabOrder = 3
            Width = 287
          end
          object btnProdutor: TcxButtonEdit
            Left = 328
            Top = 74
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 15
            Text = 'btnProdutor'
            OnClick = btnProdutorClick
            OnExit = btnProdutorExit
            Width = 25
          end
          object btnOperacao: TcxButtonEdit
            Left = 539
            Top = 31
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 14
            Text = 'btnOperacao'
            OnClick = btnOperacaoClick
            OnExit = btnOperacaoExit
            Width = 25
          end
          object btnTerceiro: TcxButtonEdit
            Left = 328
            Top = 114
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 16
            Text = 'btnLogradouro'
            OnClick = btnTerceiroClick
            OnExit = btnTerceiroExit
            Width = 25
          end
          object btnConta: TcxButtonEdit
            Left = 420
            Top = 153
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 18
            Text = 'btnLogradouro'
            OnClick = btnContaClick
            OnExit = btnContaExit
            Width = 25
          end
          object btnPropriedade1: TcxButtonEdit
            Left = 671
            Top = 74
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 17
            Text = 'btnLogradouro'
            OnClick = btnPropriedade1Click
            OnExit = btnPropriedade1Exit
            Width = 25
          end
          object cbPropriedade1: TcxDBLookupComboBox
            Left = 353
            Top = 74
            DataBinding.DataField = 'PROPRIEDADE_1'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'NOME'
              end>
            Properties.ListSource = dsPropriedade
            TabOrder = 6
            Width = 320
          end
          object btnHistorico: TcxButtonEdit
            Left = 549
            Top = 192
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 29
            Text = 'btnLogradouro'
            OnClick = btnHistoricoClick
            OnExit = btnPropriedade1Exit
            Width = 25
          end
          object cbHistorico: TcxDBLookupComboBox
            Left = 10
            Top = 192
            DataBinding.DataField = 'COD_HISTORICO'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'DESCRICAO'
              end>
            Properties.ListSource = dsHistorico
            TabOrder = 12
            Width = 540
          end
          object cxLabel15: TcxLabel
            Left = 10
            Top = 175
            Caption = 'Hist'#243'rico'
            Transparent = True
          end
          object btnPropriedade2: TcxButtonEdit
            Left = 671
            Top = 114
            TabStop = False
            Properties.Buttons = <
              item
                Caption = 'F9'
                Default = True
                Kind = bkText
              end>
            Properties.ViewStyle = vsButtonsOnly
            TabOrder = 31
            Text = 'btnLogradouro'
            OnClick = btnPropriedade1Click
            OnExit = btnPropriedade1Exit
            Width = 25
          end
          object cbPropriedade2: TcxDBLookupComboBox
            Left = 353
            Top = 114
            DataBinding.DataField = 'PROPRIEDADE_2'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'NOME'
              end>
            Properties.ListSource = dsPropriedade2
            TabOrder = 8
            Width = 320
          end
          object cxLabel13: TcxLabel
            Left = 353
            Top = 98
            Caption = 'Propriedade - Terceiro'
            Transparent = True
          end
          object cxDBCheckBox5: TcxDBCheckBox
            Left = 585
            Top = 193
            Caption = 'Fechado'
            DataBinding.DataField = 'FECHADA'
            DataBinding.DataSource = dsRegistro
            Properties.ReadOnly = True
            Properties.ValueChecked = 'S'
            Properties.ValueUnchecked = 'N'
            TabOrder = 33
            Transparent = True
            Width = 73
          end
          object cbEstado: TcxDBLookupComboBox
            Left = 10
            Top = 153
            DataBinding.DataField = 'ESTADO_EMISSAO'
            DataBinding.DataSource = dsRegistro
            Properties.CharCase = ecUpperCase
            Properties.KeyFieldNames = 'CODIGO'
            Properties.ListColumns = <
              item
                FieldName = 'UF'
              end>
            Properties.ListSource = DSUf
            TabOrder = 9
            Width = 87
          end
          object cxLabel18: TcxLabel
            Left = 9
            Top = 135
            Caption = 'UF - Emiss'#227'o'
            Transparent = True
          end
        end
      end
    end
  end
  inherited dsPesquisa: TDataSource
    Left = 744
    Top = 268
  end
  inherited dsRegistro: TDataSource
    Left = 792
    Top = 268
  end
  inherited dtEdit: TIBDataSet
    BeforePost = dtEditBeforePost
    OnNewRecord = dtEditNewRecord
    DeleteSQL.Strings = (
      'delete from nota_fiscal_pec'
      'where'
      '  CODIGO = :OLD_CODIGO')
    InsertSQL.Strings = (
      'insert into nota_fiscal_pec'
      
        '  (COD_HISTORICO, CODIGO, CONTA, DT_DOCTO, DT_EMISSAO, ESTADO_EM' +
        'ISSAO, '
      
        '   FECHADA, HISTORICO, NUMERO, OPERACAO, PRODUTOR, PROPRIEDADE_1' +
        ', PROPRIEDADE_2, '
      '   SERIE, TERCEIRO, VALOR)'
      'values'
      
        '  (:COD_HISTORICO, :CODIGO, :CONTA, :DT_DOCTO, :DT_EMISSAO, :EST' +
        'ADO_EMISSAO, '
      
        '   :FECHADA, :HISTORICO, :NUMERO, :OPERACAO, :PRODUTOR, :PROPRIE' +
        'DADE_1, '
      '   :PROPRIEDADE_2, :SERIE, :TERCEIRO, :VALOR)')
    RefreshSQL.Strings = (
      'Select * '
      'from nota_fiscal_pec '
      'where'
      '  CODIGO = :CODIGO')
    SelectSQL.Strings = (
      'select * from nota_fiscal_pec nf'
      'where nf.codigo = :codigo')
    ModifySQL.Strings = (
      'update nota_fiscal_pec'
      'set'
      '  COD_HISTORICO = :COD_HISTORICO,'
      '  CODIGO = :CODIGO,'
      '  CONTA = :CONTA,'
      '  DT_DOCTO = :DT_DOCTO,'
      '  DT_EMISSAO = :DT_EMISSAO,'
      '  ESTADO_EMISSAO = :ESTADO_EMISSAO,'
      '  FECHADA = :FECHADA,'
      '  HISTORICO = :HISTORICO,'
      '  NUMERO = :NUMERO,'
      '  OPERACAO = :OPERACAO,'
      '  PRODUTOR = :PRODUTOR,'
      '  PROPRIEDADE_1 = :PROPRIEDADE_1,'
      '  PROPRIEDADE_2 = :PROPRIEDADE_2,'
      '  SERIE = :SERIE,'
      '  TERCEIRO = :TERCEIRO,'
      '  VALOR = :VALOR'
      'where'
      '  CODIGO = :OLD_CODIGO')
    GeneratorField.Field = 'CODIGO'
    GeneratorField.Generator = 'GEN_NOTA_FISCAL_ID'
    GeneratorField.ApplyEvent = gamOnPost
    Left = 792
    Top = 228
    object dtEditCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"NOTA_FISCAL_PEC"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dtEditCONTA: TIntegerField
      FieldName = 'CONTA'
      Origin = '"NOTA_FISCAL_PEC"."CONTA"'
    end
    object dtEditVALOR: TIBBCDField
      FieldName = 'VALOR'
      Origin = '"NOTA_FISCAL_PEC"."VALOR"'
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtEditHISTORICO: TMemoField
      FieldName = 'HISTORICO'
      Origin = '"NOTA_FISCAL_PEC"."HISTORICO"'
      ProviderFlags = [pfInUpdate]
      BlobType = ftMemo
      Size = 8
    end
    object dtEditNUMERO: TIBStringField
      FieldName = 'NUMERO'
      Origin = '"NOTA_FISCAL_PEC"."NUMERO"'
    end
    object dtEditSERIE: TIBStringField
      FieldName = 'SERIE'
      Origin = '"NOTA_FISCAL_PEC"."SERIE"'
    end
    object dtEditDT_EMISSAO: TDateField
      FieldName = 'DT_EMISSAO'
      Origin = '"NOTA_FISCAL_PEC"."DT_EMISSAO"'
    end
    object dtEditDT_DOCTO: TDateField
      FieldName = 'DT_DOCTO'
      Origin = '"NOTA_FISCAL_PEC"."DT_DOCTO"'
    end
    object dtEditOPERACAO: TIntegerField
      FieldName = 'OPERACAO'
      Origin = '"NOTA_FISCAL_PEC"."OPERACAO"'
      OnValidate = dtEditOPERACAOValidate
    end
    object dtEditPRODUTOR: TIntegerField
      FieldName = 'PRODUTOR'
      Origin = '"NOTA_FISCAL_PEC"."PRODUTOR"'
      OnChange = dtEditPRODUTORChange
    end
    object dtEditPROPRIEDADE_1: TIntegerField
      FieldName = 'PROPRIEDADE_1'
      Origin = '"NOTA_FISCAL_PEC"."PROPRIEDADE_1"'
      OnChange = dtEditPROPRIEDADE_1Change
    end
    object dtEditTERCEIRO: TIntegerField
      FieldName = 'TERCEIRO'
      Origin = '"NOTA_FISCAL_PEC"."TERCEIRO"'
      OnChange = dtEditTERCEIROChange
    end
    object dtEditPROPRIEDADE_2: TIntegerField
      FieldName = 'PROPRIEDADE_2'
      Origin = '"NOTA_FISCAL_PEC"."PROPRIEDADE_2"'
    end
    object dtEditCOD_HISTORICO: TIntegerField
      FieldName = 'COD_HISTORICO'
      Origin = '"NOTA_FISCAL_PEC"."COD_HISTORICO"'
    end
    object dtEditFECHADA: TIBStringField
      FieldName = 'FECHADA'
      Origin = '"NOTA_FISCAL_PEC"."FECHADA"'
      FixedChar = True
      Size = 1
    end
    object dtEditESTADO_EMISSAO: TIntegerField
      FieldName = 'ESTADO_EMISSAO'
      Origin = '"NOTA_FISCAL_PEC"."ESTADO_EMISSAO"'
    end
  end
  inherited dtList: TIBQuery
    SQL.Strings = (
      
        'select nf.*, p1.nome nome_produtor, pp1.nome propriedade_produto' +
        'r,'
      
        'pp2.nome propriedade_terceiro, op.nome nome_operacao, pl.nome no' +
        'me_plano,'
      
        'p3.nome nome_terceiro, h.descricao historico_padrao, uf.uf uf_em' +
        'issao ,'
      
        '(extract (month from nf.dt_docto)||'#39'/'#39'||extract (year from nf.dt' +
        '_docto)) mes from nota_fiscal_pec nf'
      'left join produtores p1 on (p1.codigo = nf.produtor)'
      'left join propriedade pp1 on (nf.propriedade_1 = pp1.codigo)'
      'left join propriedade pp2 on (nf.propriedade_2 = pp2.codigo)'
      'left join operacoes op on (op.codigo = nf.operacao)'
      'left join plano_conta pl on (op.codigo = nf.conta)'
      'left join produtores p3 on (p3.codigo = nf.terceiro)'
      'left join historico h on (h.codigo = nf.cod_historico)'
      'left join estados uf on (uf.codigo = nf.estado_emissao)')
    Left = 744
    Top = 228
    object dtListCODIGO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODIGO'
      Origin = '"NOTA_FISCAL"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dtListCONTA: TIntegerField
      DisplayLabel = 'C'#243'd. Conta'
      FieldName = 'CONTA'
      Origin = '"NOTA_FISCAL"."CONTA"'
    end
    object dtListVALOR: TIBBCDField
      DisplayLabel = 'Valor'
      FieldName = 'VALOR'
      Origin = '"NOTA_FISCAL"."VALOR"'
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtListHISTORICO: TMemoField
      DisplayLabel = 'Hist'#243'rico'
      FieldName = 'HISTORICO'
      Origin = '"NOTA_FISCAL"."HISTORICO"'
      ProviderFlags = [pfInUpdate]
      BlobType = ftMemo
      Size = 8
    end
    object dtListNUMERO: TIBStringField
      DisplayLabel = 'NF'
      FieldName = 'NUMERO'
      Origin = '"NOTA_FISCAL"."NUMERO"'
    end
    object dtListSERIE: TIBStringField
      DisplayLabel = 'Serie'
      FieldName = 'SERIE'
      Origin = '"NOTA_FISCAL"."SERIE"'
    end
    object dtListDT_EMISSAO: TDateField
      DisplayLabel = 'Data Emiss'#227'o'
      FieldName = 'DT_EMISSAO'
      Origin = '"NOTA_FISCAL"."DT_EMISSAO"'
    end
    object dtListDT_DOCTO: TDateField
      DisplayLabel = 'Data Movimento'
      FieldName = 'DT_DOCTO'
      Origin = '"NOTA_FISCAL"."DT_DOCTO"'
    end
    object dtListOPERACAO: TIntegerField
      DisplayLabel = 'C'#243'd. Opera'#231#227'o'
      FieldName = 'OPERACAO'
      Origin = '"NOTA_FISCAL"."OPERACAO"'
    end
    object dtListPRODUTOR: TIntegerField
      DisplayLabel = 'Produtor'
      FieldName = 'PRODUTOR'
      Origin = '"NOTA_FISCAL"."PRODUTOR"'
    end
    object dtListNOME_PRODUTOR: TIBStringField
      DisplayLabel = 'Produtor'
      FieldName = 'NOME_PRODUTOR'
      Origin = '"PRODUTORES"."NOME"'
      Size = 50
    end
    object dtListNOME_OPERACAO: TIBStringField
      DisplayLabel = 'Opera'#231#227'o'
      FieldName = 'NOME_OPERACAO'
      Origin = '"OPERACOES"."NOME"'
      Size = 50
    end
    object dtListNOME_PLANO: TIBStringField
      DisplayLabel = 'Conta'
      FieldName = 'NOME_PLANO'
      Origin = '"PLANO_CONTA"."NOME"'
      Size = 50
    end
    object dtListNOME_TERCEIRO: TIBStringField
      DisplayLabel = 'Terceiro'
      FieldName = 'NOME_TERCEIRO'
      Origin = '"PRODUTORES"."NOME"'
      Size = 50
    end
    object dtListTERCEIRO: TIntegerField
      DisplayLabel = 'C'#243'd. Terceiro'
      FieldName = 'TERCEIRO'
      Origin = '"NOTA_FISCAL"."TERCEIRO"'
    end
    object dtListCOD_HISTORICO: TIntegerField
      DisplayLabel = 'C'#243'd. Historico'
      FieldName = 'COD_HISTORICO'
      Origin = '"NOTA_FISCAL"."COD_HISTORICO"'
    end
    object dtListHISTORICO_PADRAO: TIBStringField
      DisplayLabel = 'Hist'#243'rico Padr'#227'o'
      FieldName = 'HISTORICO_PADRAO'
      Origin = '"HISTORICO"."DESCRICAO"'
      Size = 50
    end
    object dtListPROPRIEDADE_1: TIntegerField
      DisplayLabel = 'C'#243'd. Prop. Produtor'
      FieldName = 'PROPRIEDADE_1'
      Origin = '"NOTA_FISCAL_PEC"."PROPRIEDADE_1"'
    end
    object dtListPROPRIEDADE_2: TIntegerField
      DisplayLabel = 'C'#243'd. Prop. Terceiro'
      FieldName = 'PROPRIEDADE_2'
      Origin = '"NOTA_FISCAL_PEC"."PROPRIEDADE_2"'
    end
    object dtListPROPRIEDADE_PRODUTOR: TIBStringField
      DisplayLabel = 'Prop. Produtor'
      FieldName = 'PROPRIEDADE_PRODUTOR'
      Origin = '"PROPRIEDADE"."NOME"'
      Size = 50
    end
    object dtListPROPRIEDADE_TERCEIRO: TIBStringField
      DisplayLabel = 'Prop. Terceiro'
      FieldName = 'PROPRIEDADE_TERCEIRO'
      Origin = '"PROPRIEDADE"."NOME"'
      Size = 50
    end
    object dtListMES: TIBStringField
      DisplayLabel = 'M'#234's'
      FieldName = 'MES'
      ProviderFlags = []
      Size = 13
    end
    object dtListFECHADA: TIBStringField
      DisplayLabel = 'Fechada'
      FieldName = 'FECHADA'
      Origin = '"NOTA_FISCAL_PEC"."FECHADA"'
      FixedChar = True
      Size = 1
    end
    object dtListESTADO_EMISSAO: TIntegerField
      FieldName = 'ESTADO_EMISSAO'
      Origin = '"NOTA_FISCAL_PEC"."ESTADO_EMISSAO"'
    end
    object dtListUF_EMISSAO: TIBStringField
      DisplayLabel = 'UF Emiss'#227'o'
      FieldName = 'UF_EMISSAO'
      Origin = '"ESTADOS"."UF"'
      FixedChar = True
      Size = 2
    end
  end
  inherited dxBarManager: TdxBarManager
    Categories.ItemsVisibles = (
      2
      2)
    Categories.Visibles = (
      True
      True)
    Left = 464
    Top = 504
    DockControlHeights = (
      0
      0
      0
      26)
  end
  inherited ActionList1: TActionList
    Left = 264
    Top = 224
    inherited ActCadLookup: TAction
      OnExecute = ActCadLookupExecute
    end
    object ActFecharNF: TAction
      Caption = 'Fechar Nota Fiscal'
      OnExecute = ActFecharNFExecute
    end
    object ActEstornarNF: TAction
      Caption = 'Estornar Nota Fiscal'
      OnExecute = ActEstornarNFExecute
    end
  end
  inherited dsLink: TDataSource
    Left = 760
    Top = 300
  end
  inherited cxImageList1: TcxImageList
    FormatVersion = 1
    DesignInfo = 33030864
  end
  inherited dxBarDBNavigator1: TdxBarDBNavigator
    Left = 432
    Top = 504
  end
  inherited GridPopupMenu: TcxGridPopupMenu
    Left = 584
    Top = 480
  end
  inherited SaveDialog: TSaveDialog
    Left = 496
    Top = 504
  end
  inherited ACBrEnterTab1: TACBrEnterTab
    Left = 752
    Top = 504
  end
  inherited cxPropertiesStore: TcxPropertiesStore
    Components = <
      item
        Component = ACBrEnterTab1
        Properties.Strings = (
          'AboutACBr'
          'AllowDefault'
          'EnterAsTab'
          'Name'
          'Tag')
      end
      item
        Component = GridDBBandedTableView2COD_HISTORICO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2CODIGO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2CONTA
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2DT_DOCTO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2DT_EMISSAO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2FECHADA
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2HISTORICO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2HISTORICO_PADRAO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2MES
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2NOME_OPERACAO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2NOME_PLANO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2NOME_PRODUTOR
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2NOME_TERCEIRO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2NUMERO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2OPERACAO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2PRODUTOR
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2PROPRIEDADE_1
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2PROPRIEDADE_2
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2PROPRIEDADE_PRODUTOR
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2PROPRIEDADE_TERCEIRO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2SERIE
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2TERCEIRO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2UF_EMISSAO
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end
      item
        Component = GridDBBandedTableView2VALOR
        Properties.Strings = (
          'AlternateCaption'
          'BestFitMaxWidth'
          'Caption'
          'DataBinding'
          'DateTimeGrouping'
          'FakeComponentLink1'
          'FakeComponentLink2'
          'FakeComponentLink3'
          'FooterAlignmentHorz'
          'GroupIndex'
          'GroupSummaryAlignment'
          'HeaderAlignmentHorz'
          'HeaderAlignmentVert'
          'HeaderGlyph'
          'HeaderGlyphAlignmentHorz'
          'HeaderGlyphAlignmentVert'
          'MinWidth'
          'Name'
          'Options'
          'Position'
          'Properties'
          'PropertiesClassName'
          'RepositoryItem'
          'SortIndex'
          'SortOrder'
          'Styles'
          'Summary'
          'Tag'
          'Visible'
          'VisibleForCustomization'
          'Width')
      end>
    Left = 560
    Top = 504
  end
  inherited cxIntl1: TcxIntl
    Left = 208
    Top = 4
  end
  object lstProdutores: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      'select p.codigo, p.nome from produtores p'
      'where p.produtor = '#39'S'#39' and p.ativo = '#39'S'#39)
    Left = 640
    Top = 432
    object lstProdutoresCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PRODUTORES"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstProdutoresNOME: TIBStringField
      FieldName = 'NOME'
      Origin = '"PRODUTORES"."NOME"'
      Size = 50
    end
  end
  object lstTerceiro: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      'select p.codigo, p.nome from produtores p'
      
        'where  p.ativo = '#39'S'#39' and ((p.terceiro = '#39'S'#39') or (p.frigorifico =' +
        ' '#39'S'#39') or (p.produtor = '#39'S'#39'))')
    Left = 672
    Top = 432
    object lstTerceiroCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PRODUTORES"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstTerceiroNOME: TIBStringField
      FieldName = 'NOME'
      Origin = '"PRODUTORES"."NOME"'
      Size = 50
    end
  end
  object lstConta: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      'select * from plano_conta p'
      
        'where 0 = (select count(*) from plano_conta p2 where p2.codigo_p' +
        'ai = p.codigo)')
    Left = 736
    Top = 432
    object lstContaCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PLANO_CONTA"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstContaCODIGO_STR: TIBStringField
      FieldName = 'CODIGO_STR'
      Origin = '"PLANO_CONTA"."CODIGO_STR"'
      Size = 30
    end
    object lstContaCODIGO_PAI: TIntegerField
      FieldName = 'CODIGO_PAI'
      Origin = '"PLANO_CONTA"."CODIGO_PAI"'
    end
    object lstContaTRIBUTAVEL: TIBStringField
      FieldName = 'TRIBUTAVEL'
      Origin = '"PLANO_CONTA"."TRIBUTAVEL"'
      FixedChar = True
      Size = 1
    end
    object lstContaTIPO: TIBStringField
      FieldName = 'TIPO'
      Origin = '"PLANO_CONTA"."TIPO"'
      FixedChar = True
      Size = 1
    end
    object lstContaNOME: TIBStringField
      FieldName = 'NOME'
      Origin = '"PLANO_CONTA"."NOME"'
      Size = 50
    end
  end
  object dsConta: TDataSource
    DataSet = lstConta
    Left = 736
    Top = 464
  end
  object dsPropriedade: TDataSource
    DataSet = lstPropriedade
    Left = 704
    Top = 464
  end
  object dsTerceiro: TDataSource
    DataSet = lstTerceiro
    Left = 672
    Top = 464
  end
  object dsProdutor: TDataSource
    DataSet = lstProdutores
    Left = 640
    Top = 464
  end
  object dsRegistroComp1: TDataSource
    DataSet = dtNFItens
    Left = 520
    Top = 472
  end
  object dsLinkNFs: TDataSource
    DataSet = dtListNFItens
    Left = 504
    Top = 404
  end
  object dtListNFItens: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    DataSource = dsRegistro
    SQL.Strings = (
      'select nfi.*, p.nome nome_produto from nota_fiscal_item_pec nfi'
      'inner join produtos p on (p.codigo = nfi.produto)'
      'where nfi.nota_fiscal = :codigo')
    Left = 488
    Top = 440
    ParamData = <
      item
        DataType = ftInteger
        Name = 'CODIGO'
        ParamType = ptUnknown
        Size = 4
      end>
    object dtListNFItensCODIGO: TIntegerField
      DisplayLabel = 'C'#243'digo'
      FieldName = 'CODIGO'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dtListNFItensPRODUTO: TIntegerField
      DisplayLabel = 'C'#243'd. Produto'
      FieldName = 'PRODUTO'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."PRODUTO"'
    end
    object dtListNFItensQTDE: TIBBCDField
      DisplayLabel = 'Qtde'
      FieldName = 'QTDE'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."QTDE"'
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtListNFItensVALOR: TIBBCDField
      DisplayLabel = 'Valor'
      FieldName = 'VALOR'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."VALOR"'
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtListNFItensTOTAL: TIBBCDField
      DisplayLabel = 'Total'
      FieldName = 'TOTAL'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."TOTAL"'
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtListNFItensNOTA_FISCAL: TIntegerField
      DisplayLabel = 'C'#243'd. NFP'
      FieldName = 'NOTA_FISCAL'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."NOTA_FISCAL"'
    end
    object dtListNFItensNOME_PRODUTO: TIBStringField
      DisplayLabel = 'Produto'
      FieldName = 'NOME_PRODUTO'
      Origin = '"PRODUTOS"."NOME"'
      Size = 50
    end
  end
  object dsPesquisaComp1: TDataSource
    DataSet = dtListNFItens
    Left = 488
    Top = 472
  end
  object dtNFItens: TIBDataSet
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    BeforeInsert = dtNFItensBeforeInsert
    BeforePost = dtNFItensBeforePost
    OnNewRecord = dtNFItensNewRecord
    DeleteSQL.Strings = (
      'delete from nota_fiscal_item_pec'
      'where'
      '  CODIGO = :OLD_CODIGO')
    InsertSQL.Strings = (
      'insert into nota_fiscal_item_pec'
      '  (CODIGO, NOTA_FISCAL, PRODUTO, QTDE, TOTAL, VALOR)'
      'values'
      '  (:CODIGO, :NOTA_FISCAL, :PRODUTO, :QTDE, :TOTAL, :VALOR)')
    RefreshSQL.Strings = (
      'Select * '
      'from nota_fiscal_item_pec '
      'where'
      '  CODIGO = :CODIGO')
    SelectSQL.Strings = (
      'select nfi.* from nota_fiscal_item_pec nfi'
      'where nfi.codigo = :codigo')
    ModifySQL.Strings = (
      'update nota_fiscal_item_pec'
      'set'
      '  CODIGO = :CODIGO,'
      '  NOTA_FISCAL = :NOTA_FISCAL,'
      '  PRODUTO = :PRODUTO,'
      '  QTDE = :QTDE,'
      '  TOTAL = :TOTAL,'
      '  VALOR = :VALOR'
      'where'
      '  CODIGO = :OLD_CODIGO')
    GeneratorField.Field = 'CODIGO'
    GeneratorField.Generator = 'GEN_NOTA_FISCAL_ITEM_ID'
    GeneratorField.ApplyEvent = gamOnPost
    DataSource = dsLinkNFs
    Left = 520
    Top = 440
    object dtNFItensCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object dtNFItensPRODUTO: TIntegerField
      FieldName = 'PRODUTO'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."PRODUTO"'
    end
    object dtNFItensQTDE: TIBBCDField
      FieldName = 'QTDE'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."QTDE"'
      OnValidate = dtNFItensQTDEValidate
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtNFItensTOTAL: TIBBCDField
      FieldName = 'TOTAL'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."TOTAL"'
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtNFItensVALOR: TIBBCDField
      FieldName = 'VALOR'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."VALOR"'
      OnValidate = dtNFItensQTDEValidate
      DisplayFormat = '###,##0.00'
      Precision = 18
      Size = 2
    end
    object dtNFItensNOTA_FISCAL: TIntegerField
      FieldName = 'NOTA_FISCAL'
      Origin = '"NOTA_FISCAL_ITEM_PEC"."NOTA_FISCAL"'
    end
  end
  object dsProdutos: TDataSource
    DataSet = lstProdutos
    Left = 608
    Top = 464
  end
  object cxGridPopupMenu1: TcxGridPopupMenu
    PopupMenus = <
      item
        HitTypes = [gvhtCell, gvhtRecord, gvhtRowIndicator]
        Index = 0
      end>
    Left = 584
    Top = 536
  end
  object dsOperacoes: TDataSource
    DataSet = lstOperacoes
    Left = 768
    Top = 464
  end
  object lstOperacoes: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      ''
      'select * from operacoes'
      'where coalesce(tipo,'#39#39') = '#39'P'#39)
    Left = 768
    Top = 432
    object lstOperacoesCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"OPERACOES"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstOperacoesNOME: TIBStringField
      FieldName = 'NOME'
      Origin = '"OPERACOES"."NOME"'
      Size = 50
    end
    object lstOperacoesCONTA: TIntegerField
      FieldName = 'CONTA'
      Origin = '"OPERACOES"."CONTA"'
    end
    object lstOperacoesTIPO: TIBStringField
      FieldName = 'TIPO'
      Origin = '"OPERACOES"."TIPO"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesTIPO_MOVTO: TIBStringField
      FieldName = 'TIPO_MOVTO'
      Origin = '"OPERACOES"."TIPO_MOVTO"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesTIPO_FISCAL: TIBStringField
      FieldName = 'TIPO_FISCAL'
      Origin = '"OPERACOES"."TIPO_FISCAL"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesGERA_CREDITO_ICMS: TIBStringField
      FieldName = 'GERA_CREDITO_ICMS'
      Origin = '"OPERACOES"."GERA_CREDITO_ICMS"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesMOVIMENTA_ESTOQUE: TIBStringField
      FieldName = 'MOVIMENTA_ESTOQUE'
      Origin = '"OPERACOES"."MOVIMENTA_ESTOQUE"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesPERDA_CONSUMO: TIBStringField
      FieldName = 'PERDA_CONSUMO'
      Origin = '"OPERACOES"."PERDA_CONSUMO"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesVENDA_DIRETA: TIBStringField
      FieldName = 'VENDA_DIRETA'
      Origin = '"OPERACOES"."VENDA_DIRETA"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesENTRADA: TIBStringField
      FieldName = 'ENTRADA'
      Origin = '"OPERACOES"."ENTRADA"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesSAIDA: TIBStringField
      FieldName = 'SAIDA'
      Origin = '"OPERACOES"."SAIDA"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesINSUMOS: TIBStringField
      FieldName = 'INSUMOS'
      Origin = '"OPERACOES"."INSUMOS"'
      FixedChar = True
      Size = 1
    end
    object lstOperacoesINSUMOS_OUTROS_ANIMAIS: TIBStringField
      FieldName = 'INSUMOS_OUTROS_ANIMAIS'
      Origin = '"OPERACOES"."INSUMOS_OUTROS_ANIMAIS"'
      FixedChar = True
      Size = 1
    end
  end
  object lstParametro: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    BeforeOpen = lstParametroBeforeOpen
    SQL.Strings = (
      'select * from parametros p'
      'where p.usuario = :usuario')
    Left = 576
    Top = 434
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'usuario'
        ParamType = ptUnknown
      end>
    object lstParametroCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PARAMETROS"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstParametroUSUARIO: TIntegerField
      FieldName = 'USUARIO'
      Origin = '"PARAMETROS"."USUARIO"'
    end
    object lstParametroDATA_MOVTO: TDateField
      FieldName = 'DATA_MOVTO'
      Origin = '"PARAMETROS"."DATA_MOVTO"'
    end
    object lstParametroOPERACAO: TIntegerField
      FieldName = 'OPERACAO'
      Origin = '"PARAMETROS"."OPERACAO"'
    end
    object lstParametroPRODUTOR: TIntegerField
      FieldName = 'PRODUTOR'
      Origin = '"PARAMETROS"."PRODUTOR"'
    end
    object lstParametroTERCEIRO: TIntegerField
      FieldName = 'TERCEIRO'
      Origin = '"PARAMETROS"."TERCEIRO"'
    end
    object lstParametroPROPRIEDADE: TIntegerField
      FieldName = 'PROPRIEDADE'
      Origin = '"PARAMETROS"."PROPRIEDADE"'
    end
    object lstParametroPRODUTO: TIntegerField
      FieldName = 'PRODUTO'
      Origin = '"PARAMETROS"."PRODUTO"'
    end
  end
  object DataSource1: TDataSource
    DataSet = lstConta
    Left = 688
    Top = 392
  end
  object lstPropriedade: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      
        'select pp.codigo, coalesce(pp.insc_estadual,'#39#39')||'#39' ( '#39'||coalesce' +
        '(pp.nome,'#39#39')||'#39' )'#39' nome from propriedade pp'
      'where pp.produtor = :codigo'
      '')
    Left = 704
    Top = 432
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'codigo'
        ParamType = ptUnknown
      end>
    object lstPropriedadeCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PROPRIEDADE"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstPropriedadeNOME: TIBStringField
      FieldName = 'NOME'
      ProviderFlags = []
      Size = 75
    end
  end
  object lstProdutos: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    BeforeOpen = lstParametroBeforeOpen
    SQL.Strings = (
      'select * from produtos p'
      'where coalesce(p.tipo,'#39#39') = '#39'P'#39)
    Left = 608
    Top = 434
    object lstProdutosCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PRODUTOS"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstProdutosNOME: TIBStringField
      FieldName = 'NOME'
      Origin = '"PRODUTOS"."NOME"'
      Size = 50
    end
    object lstProdutosGRUPO: TIntegerField
      FieldName = 'GRUPO'
      Origin = '"PRODUTOS"."GRUPO"'
    end
    object lstProdutosUNIDADE: TIntegerField
      FieldName = 'UNIDADE'
      Origin = '"PRODUTOS"."UNIDADE"'
    end
    object lstProdutosVALOR: TFloatField
      FieldName = 'VALOR'
      Origin = '"PRODUTOS"."VALOR"'
    end
    object lstProdutosATIVO: TIBStringField
      FieldName = 'ATIVO'
      Origin = '"PRODUTOS"."ATIVO"'
      FixedChar = True
      Size = 1
    end
    object lstProdutosTIPO: TIBStringField
      FieldName = 'TIPO'
      Origin = '"PRODUTOS"."TIPO"'
      FixedChar = True
      Size = 1
    end
    object lstProdutosEXPORTA_DAP: TIBStringField
      FieldName = 'EXPORTA_DAP'
      Origin = '"PRODUTOS"."EXPORTA_DAP"'
      FixedChar = True
      Size = 1
    end
    object lstProdutosINSUMOS: TIBStringField
      FieldName = 'INSUMOS'
      Origin = '"PRODUTOS"."INSUMOS"'
      FixedChar = True
      Size = 1
    end
  end
  object dsHistorico: TDataSource
    DataSet = lstHistorico
    Left = 800
    Top = 464
  end
  object lstHistorico: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      'select * from historico')
    Left = 800
    Top = 432
    object lstHistoricoCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"HISTORICO"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstHistoricoTIPO_COMPLEM: TIBStringField
      FieldName = 'TIPO_COMPLEM'
      Origin = '"HISTORICO"."TIPO_COMPLEM"'
      FixedChar = True
      Size = 1
    end
    object lstHistoricoDESCRICAO: TIBStringField
      FieldName = 'DESCRICAO'
      Origin = '"HISTORICO"."DESCRICAO"'
      Size = 50
    end
  end
  object lstPropriedade2: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      
        'select pp.codigo, coalesce(pp.insc_estadual,'#39#39')||'#39' ( '#39'||coalesce' +
        '(pp.nome,'#39#39')||'#39' )'#39' nome from propriedade pp'
      'where pp.produtor = :codigo'
      '')
    Left = 552
    Top = 432
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'codigo'
        ParamType = ptUnknown
      end>
    object lstPropriedade2CODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"PROPRIEDADE"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstPropriedade2NOME: TIBStringField
      FieldName = 'NOME'
      ProviderFlags = []
      Size = 75
    end
  end
  object dsPropriedade2: TDataSource
    DataSet = lstPropriedade2
    Left = 552
    Top = 464
  end
  object UPDNF: TIBSQL
    Database = dmPrincipal.Database
    SQL.Strings = (
      
        'update nota_fiscal_pec nf set nf.fechada = :st where nf.codigo =' +
        ' :codigo')
    Transaction = dmPrincipal.Transaction
    Left = 710
    Top = 228
  end
  object PopupMenu1: TPopupMenu
    Left = 312
    Top = 220
    object FecharTransportedeEra1: TMenuItem
      Action = ActFecharNF
    end
    object EstornarTransportedeEra1: TMenuItem
      Action = ActEstornarNF
    end
  end
  object DSUf: TDataSource
    DataSet = lstUF
    Left = 831
    Top = 464
  end
  object lstUF: TIBQuery
    Database = dmPrincipal.Database
    Transaction = dmPrincipal.Transaction
    SQL.Strings = (
      'select * from ESTADOS')
    Left = 831
    Top = 432
    object lstUFCODIGO: TIntegerField
      FieldName = 'CODIGO'
      Origin = '"ESTADOS"."CODIGO"'
      ProviderFlags = [pfInUpdate, pfInWhere, pfInKey]
      Required = True
    end
    object lstUFNOME: TIBStringField
      FieldName = 'NOME'
      Origin = '"ESTADOS"."NOME"'
      Size = 50
    end
    object lstUFUF: TIBStringField
      FieldName = 'UF'
      Origin = '"ESTADOS"."UF"'
      FixedChar = True
      Size = 2
    end
  end
end
